#encoding=utf-8

from django.conf.urls import patterns, include, url
from websys.views import  AboutView

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
import xadmin
from django.conf import settings
from django.conf.urls.static import static

xadmin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'andy_manager.views.home', name='home'),
    # url(r'^andy_manager/', include('andy_manager.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
    #url(r'^xadmin/websys/settlement/', 'websys.views.testpage'),
    url(r'^xadmin/about/', AboutView.as_view()),
    url(r'^xadmin/', include(xadmin.site.urls), name='xadmin'),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^api/hxh_user_register/', 'websys.views.hxh_user_register', name='hxh_user_register'),
    url(r'^api/hxh_user_pay/', 'websys.views.hxh_user_pay', name='hxh_user_pay'),
    #猎人
    url(r'^api/hxhunter/', include('websys.view.hxhunter')),
    #麻将大厅
    url(r'^api/hall/', include('websys.view.mjhall')),
    #山东大厅
    url(r'^api/hall/jn/', include('websys.view.mjhall_jn')),
    url(r'^api/hall/zy/', include('websys.view.mjhall_zytx')),
    url(r'^api/', include('websys.views')),
     #充值
    url(r'^api/recharge/', include('websys.view.recharge')),
     #报表
    url(r'^xadmin/report/', include('websys.view.report')),
    #刷新验证码
    url(r'^xadmin/captcha', 'websys.fun.refreshCaptcha', name='refreshCaptcha'),
    url(r'^xadmin/sysoper/',  include('websys.view.sysoper')),
    #测试的
    #url(r'^xadmin/test', 'websys.fun.refreshCaptcha',{'tt':'123'}, name='test'),#fun 中对应陈函数有tt参数
    url(r'^xadmin/testbox/', 'websys.views.testbox'),
    url(r'^xadmin/testbox123/', 'websys.views.testbox123',{'path':'testbox123'}),
    url(r'^xadmin/testbox456/', 'websys.views.testbox123',{'path':'index'}),
)
 #+static(settings.UPLOAD_ROOT, document_root=settings.UPLOAD_ROOT)

from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += staticfiles_urlpatterns()
